repo: Add _ostree_repo_allocate_tmpdir helper
authorAlexander Larsson <alexl@redhat.com>
Fri, 11 Dec 2015 17:43:05 +0000 (18:43 +0100)
committerAlexander Larsson <alexl@redhat.com>
Mon, 14 Dec 2015 07:37:55 +0000 (08:37 +0100)
commitbe19c888619f5113cc4b12c01df2e51ccf4375fd
treec5c81a1fd144ded006ec646c6dc4e8ab3f452f97
parent211ca6795c470f0196c9d65bd7e8010f711c4f0b
repo: Add _ostree_repo_allocate_tmpdir helper

This creates a subdirectory of the tmp dir with a selected prefix,
and takes a lockfile to ensure that nobody else is using the same directory.
However, if a directory with the same prefix already exists and is
not locked that is used instead.

The later is useful if you want to support some kind of resumed operation
on the tmpdir.

touch reused dirs

https://bugzilla.gnome.org/show_bug.cgi?id=757611
src/libostree/ostree-repo-private.h
src/libostree/ostree-repo.c